import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

import 'package:flutter_code_push_next/index.dart';

class WTThemeData extends WTVMBaseType<ThemeData> with BaseTypeUtils {
  static WTThemeData? _instance;
  factory WTThemeData() => _instance ??= WTThemeData._internal();

  WTThemeData._internal() {
    definePath = 'packages/flutter/lib/src/material/theme_data.dart';
    defineName = 'ThemeData';

    attributesMap = {
      "ThemeData": m_ThemeData,
      "raw": raw,
      "from": from,
      "light": light,
      "dark": dark,
      "fallback": fallback,
      "localize": localize,
      "estimateBrightnessForColor": estimateBrightnessForColor,
      "lerp": lerp,
    };

    setAttributeMap = null;

    getAttributeMap = null;
  }

  ThemeData m_ThemeData({
    Brightness? brightness,
    VisualDensity? visualDensity,
    MaterialColor? primarySwatch,
    Color? primaryColor,
    Brightness? primaryColorBrightness,
    Color? primaryColorLight,
    Color? primaryColorDark,
    Color? accentColor,
    Brightness? accentColorBrightness,
    Color? canvasColor,
    Color? shadowColor,
    Color? scaffoldBackgroundColor,
    Color? bottomAppBarColor,
    Color? cardColor,
    Color? dividerColor,
    Color? focusColor,
    Color? hoverColor,
    Color? highlightColor,
    Color? splashColor,
    InteractiveInkFeatureFactory? splashFactory,
    Color? selectedRowColor,
    Color? unselectedWidgetColor,
    Color? disabledColor,
    Color? buttonColor,
    ButtonThemeData? buttonTheme,
    ToggleButtonsThemeData? toggleButtonsTheme,
    Color? secondaryHeaderColor,
    Color? textSelectionColor,
    Color? cursorColor,
    Color? textSelectionHandleColor,
    Color? backgroundColor,
    Color? dialogBackgroundColor,
    Color? indicatorColor,
    Color? hintColor,
    Color? errorColor,
    Color? toggleableActiveColor,
    String? fontFamily,
    TextTheme? textTheme,
    TextTheme? primaryTextTheme,
    TextTheme? accentTextTheme,
    InputDecorationTheme? inputDecorationTheme,
    IconThemeData? iconTheme,
    IconThemeData? primaryIconTheme,
    IconThemeData? accentIconTheme,
    SliderThemeData? sliderTheme,
    TabBarTheme? tabBarTheme,
    TooltipThemeData? tooltipTheme,
    CardTheme? cardTheme,
    ChipThemeData? chipTheme,
    TargetPlatform? platform,
    MaterialTapTargetSize? materialTapTargetSize,
    bool? applyElevationOverlayColor,
    PageTransitionsTheme? pageTransitionsTheme,
    AppBarTheme? appBarTheme,
    ScrollbarThemeData? scrollbarTheme,
    BottomAppBarTheme? bottomAppBarTheme,
    ColorScheme? colorScheme,
    DialogTheme? dialogTheme,
    FloatingActionButtonThemeData? floatingActionButtonTheme,
    NavigationRailThemeData? navigationRailTheme,
    Typography? typography,
    NoDefaultCupertinoThemeData? cupertinoOverrideTheme,
    SnackBarThemeData? snackBarTheme,
    BottomSheetThemeData? bottomSheetTheme,
    PopupMenuThemeData? popupMenuTheme,
    MaterialBannerThemeData? bannerTheme,
    DividerThemeData? dividerTheme,
    ButtonBarThemeData? buttonBarTheme,
    BottomNavigationBarThemeData? bottomNavigationBarTheme,
    TimePickerThemeData? timePickerTheme,
    TextButtonThemeData? textButtonTheme,
    ElevatedButtonThemeData? elevatedButtonTheme,
    OutlinedButtonThemeData? outlinedButtonTheme,
    TextSelectionThemeData? textSelectionTheme,
    DataTableThemeData? dataTableTheme,
    CheckboxThemeData? checkboxTheme,
    RadioThemeData? radioTheme,
    SwitchThemeData? switchTheme,
    bool? fixTextFieldOutlineLabel,
    bool? useTextSelectionTheme,
  }) {
    return ThemeData(
      brightness: brightness,
      visualDensity: visualDensity,
      primarySwatch: primarySwatch,
      primaryColor: primaryColor,
      primaryColorBrightness: primaryColorBrightness,
      primaryColorLight: primaryColorLight,
      primaryColorDark: primaryColorDark,
      accentColor: accentColor,
      accentColorBrightness: accentColorBrightness,
      canvasColor: canvasColor,
      shadowColor: shadowColor,
      scaffoldBackgroundColor: scaffoldBackgroundColor,
      bottomAppBarColor: bottomAppBarColor,
      cardColor: cardColor,
      dividerColor: dividerColor,
      focusColor: focusColor,
      hoverColor: hoverColor,
      highlightColor: highlightColor,
      splashColor: splashColor,
      splashFactory: splashFactory,
      selectedRowColor: selectedRowColor,
      unselectedWidgetColor: unselectedWidgetColor,
      disabledColor: disabledColor,
      buttonColor: buttonColor,
      buttonTheme: buttonTheme,
      toggleButtonsTheme: toggleButtonsTheme,
      secondaryHeaderColor: secondaryHeaderColor,
      textSelectionColor: textSelectionColor,
      cursorColor: cursorColor,
      textSelectionHandleColor: textSelectionHandleColor,
      backgroundColor: backgroundColor,
      dialogBackgroundColor: dialogBackgroundColor,
      indicatorColor: indicatorColor,
      hintColor: hintColor,
      errorColor: errorColor,
      toggleableActiveColor: toggleableActiveColor,
      fontFamily: fontFamily,
      textTheme: textTheme,
      primaryTextTheme: primaryTextTheme,
      accentTextTheme: accentTextTheme,
      inputDecorationTheme: inputDecorationTheme,
      iconTheme: iconTheme,
      primaryIconTheme: primaryIconTheme,
      accentIconTheme: accentIconTheme,
      sliderTheme: sliderTheme,
      tabBarTheme: tabBarTheme,
      tooltipTheme: tooltipTheme,
      cardTheme: cardTheme,
      chipTheme: chipTheme,
      platform: platform,
      materialTapTargetSize: materialTapTargetSize,
      applyElevationOverlayColor: applyElevationOverlayColor,
      pageTransitionsTheme: pageTransitionsTheme,
      appBarTheme: appBarTheme,
      scrollbarTheme: scrollbarTheme,
      bottomAppBarTheme: bottomAppBarTheme,
      colorScheme: colorScheme,
      dialogTheme: dialogTheme,
      floatingActionButtonTheme: floatingActionButtonTheme,
      navigationRailTheme: navigationRailTheme,
      typography: typography,
      cupertinoOverrideTheme: cupertinoOverrideTheme,
      snackBarTheme: snackBarTheme,
      bottomSheetTheme: bottomSheetTheme,
      popupMenuTheme: popupMenuTheme,
      bannerTheme: bannerTheme,
      dividerTheme: dividerTheme,
      buttonBarTheme: buttonBarTheme,
      bottomNavigationBarTheme: bottomNavigationBarTheme,
      timePickerTheme: timePickerTheme,
      textButtonTheme: textButtonTheme,
      elevatedButtonTheme: elevatedButtonTheme,
      outlinedButtonTheme: outlinedButtonTheme,
      textSelectionTheme: textSelectionTheme,
      dataTableTheme: dataTableTheme,
      checkboxTheme: checkboxTheme,
      radioTheme: radioTheme,
      switchTheme: switchTheme,
      fixTextFieldOutlineLabel: fixTextFieldOutlineLabel,
      useTextSelectionTheme: useTextSelectionTheme,
    );
  }

  ThemeData raw({
    required VisualDensity visualDensity,
    required Color primaryColor,
    required Brightness primaryColorBrightness,
    required Color primaryColorLight,
    required Color primaryColorDark,
    required Color canvasColor,
    required Color shadowColor,
    required Color accentColor,
    required Brightness accentColorBrightness,
    required Color scaffoldBackgroundColor,
    required Color bottomAppBarColor,
    required Color cardColor,
    required Color dividerColor,
    required Color focusColor,
    required Color hoverColor,
    required Color highlightColor,
    required Color splashColor,
    required InteractiveInkFeatureFactory splashFactory,
    required Color selectedRowColor,
    required Color unselectedWidgetColor,
    required Color disabledColor,
    required ButtonThemeData buttonTheme,
    required Color buttonColor,
    required ToggleButtonsThemeData toggleButtonsTheme,
    required Color secondaryHeaderColor,
    required Color textSelectionColor,
    required Color cursorColor,
    required Color textSelectionHandleColor,
    required Color backgroundColor,
    required Color dialogBackgroundColor,
    required Color indicatorColor,
    required Color hintColor,
    required Color errorColor,
    required Color toggleableActiveColor,
    required TextTheme textTheme,
    required TextTheme primaryTextTheme,
    required TextTheme accentTextTheme,
    required InputDecorationTheme inputDecorationTheme,
    required IconThemeData iconTheme,
    required IconThemeData primaryIconTheme,
    required IconThemeData accentIconTheme,
    required SliderThemeData sliderTheme,
    required TabBarTheme tabBarTheme,
    required TooltipThemeData tooltipTheme,
    required CardTheme cardTheme,
    required ChipThemeData chipTheme,
    required TargetPlatform platform,
    required MaterialTapTargetSize materialTapTargetSize,
    required bool applyElevationOverlayColor,
    required PageTransitionsTheme pageTransitionsTheme,
    required AppBarTheme appBarTheme,
    required ScrollbarThemeData scrollbarTheme,
    required BottomAppBarTheme bottomAppBarTheme,
    required ColorScheme colorScheme,
    required DialogTheme dialogTheme,
    required FloatingActionButtonThemeData floatingActionButtonTheme,
    required NavigationRailThemeData navigationRailTheme,
    required Typography typography,
    required NoDefaultCupertinoThemeData cupertinoOverrideTheme,
    required SnackBarThemeData snackBarTheme,
    required BottomSheetThemeData bottomSheetTheme,
    required PopupMenuThemeData popupMenuTheme,
    required MaterialBannerThemeData bannerTheme,
    required DividerThemeData dividerTheme,
    required ButtonBarThemeData buttonBarTheme,
    required BottomNavigationBarThemeData bottomNavigationBarTheme,
    required TimePickerThemeData timePickerTheme,
    required TextButtonThemeData textButtonTheme,
    required ElevatedButtonThemeData elevatedButtonTheme,
    required OutlinedButtonThemeData outlinedButtonTheme,
    required TextSelectionThemeData textSelectionTheme,
    required DataTableThemeData dataTableTheme,
    required CheckboxThemeData checkboxTheme,
    required RadioThemeData radioTheme,
    required SwitchThemeData switchTheme,
    required bool fixTextFieldOutlineLabel,
    required bool useTextSelectionTheme,
  }) {
    return ThemeData.raw(
      visualDensity: visualDensity,
      primaryColor: primaryColor,
      primaryColorBrightness: primaryColorBrightness,
      primaryColorLight: primaryColorLight,
      primaryColorDark: primaryColorDark,
      canvasColor: canvasColor,
      shadowColor: shadowColor,
      accentColor: accentColor,
      accentColorBrightness: accentColorBrightness,
      scaffoldBackgroundColor: scaffoldBackgroundColor,
      bottomAppBarColor: bottomAppBarColor,
      cardColor: cardColor,
      dividerColor: dividerColor,
      focusColor: focusColor,
      hoverColor: hoverColor,
      highlightColor: highlightColor,
      splashColor: splashColor,
      splashFactory: splashFactory,
      selectedRowColor: selectedRowColor,
      unselectedWidgetColor: unselectedWidgetColor,
      disabledColor: disabledColor,
      buttonTheme: buttonTheme,
      buttonColor: buttonColor,
      toggleButtonsTheme: toggleButtonsTheme,
      secondaryHeaderColor: secondaryHeaderColor,
      textSelectionColor: textSelectionColor,
      cursorColor: cursorColor,
      textSelectionHandleColor: textSelectionHandleColor,
      backgroundColor: backgroundColor,
      dialogBackgroundColor: dialogBackgroundColor,
      indicatorColor: indicatorColor,
      hintColor: hintColor,
      errorColor: errorColor,
      toggleableActiveColor: toggleableActiveColor,
      textTheme: textTheme,
      primaryTextTheme: primaryTextTheme,
      accentTextTheme: accentTextTheme,
      inputDecorationTheme: inputDecorationTheme,
      iconTheme: iconTheme,
      primaryIconTheme: primaryIconTheme,
      accentIconTheme: accentIconTheme,
      sliderTheme: sliderTheme,
      tabBarTheme: tabBarTheme,
      tooltipTheme: tooltipTheme,
      cardTheme: cardTheme,
      chipTheme: chipTheme,
      platform: platform,
      materialTapTargetSize: materialTapTargetSize,
      applyElevationOverlayColor: applyElevationOverlayColor,
      pageTransitionsTheme: pageTransitionsTheme,
      appBarTheme: appBarTheme,
      scrollbarTheme: scrollbarTheme,
      bottomAppBarTheme: bottomAppBarTheme,
      colorScheme: colorScheme,
      dialogTheme: dialogTheme,
      floatingActionButtonTheme: floatingActionButtonTheme,
      navigationRailTheme: navigationRailTheme,
      typography: typography,
      cupertinoOverrideTheme: cupertinoOverrideTheme,
      snackBarTheme: snackBarTheme,
      bottomSheetTheme: bottomSheetTheme,
      popupMenuTheme: popupMenuTheme,
      bannerTheme: bannerTheme,
      dividerTheme: dividerTheme,
      buttonBarTheme: buttonBarTheme,
      bottomNavigationBarTheme: bottomNavigationBarTheme,
      timePickerTheme: timePickerTheme,
      textButtonTheme: textButtonTheme,
      elevatedButtonTheme: elevatedButtonTheme,
      outlinedButtonTheme: outlinedButtonTheme,
      textSelectionTheme: textSelectionTheme,
      dataTableTheme: dataTableTheme,
      checkboxTheme: checkboxTheme,
      radioTheme: radioTheme,
      switchTheme: switchTheme,
      fixTextFieldOutlineLabel: fixTextFieldOutlineLabel,
      useTextSelectionTheme: useTextSelectionTheme,
    );
  }

  ThemeData from({
    required ColorScheme colorScheme,
    TextTheme? textTheme,
  }) {
    return ThemeData.from(
      colorScheme: colorScheme,
      textTheme: textTheme,
    );
  }

  ThemeData light() {
    return ThemeData.light();
  }

  ThemeData dark() {
    return ThemeData.dark();
  }

  ThemeData fallback() {
    return ThemeData.fallback();
  }

  ThemeData localize(
    ThemeData baseTheme,
    TextTheme localTextGeometry,
  ) {
    return ThemeData.localize(
      baseTheme,
      localTextGeometry,
    );
  }

  Brightness estimateBrightnessForColor(
    Color color,
  ) {
    return ThemeData.estimateBrightnessForColor(
      color,
    );
  }

  ThemeData lerp(
    ThemeData a,
    ThemeData b,
    double t,
  ) {
    return ThemeData.lerp(
      a,
      b,
      t,
    );
  }
}
